package com.hyq.market.adapter;


import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.hyq.market.R;
import com.hyq.market.api.Constant;
import com.hyq.market.bean.Goods;

/**
 * Created by hl on 2017/5/8.
 *
 */

public class HotGoodsAdapter extends BaseQuickAdapter<Goods.DataBean, BaseViewHolder> {

    public HotGoodsAdapter() {
        super(R.layout.item_layout_goods);
    }




    @Override
    protected void convert(BaseViewHolder helper, Goods.DataBean item) {
        helper.setText(R.id.text_decs,item.getTitle());
        helper.addOnClickListener(R.id.text_like);
        ImageView imageView=helper.getView(R.id.img);
        Glide.with(imageView.getContext()).load(Constant.BASE_Url+item.getThumb()).error(R.mipmap.goods_error).into(imageView);
    }
}